<template>
  <div class="swiper-box">
    <swiper :options="swiperOptions">
      <swiper-slide v-for="(item, index) in imgList" :key="index"
        ><img :src="item.img" alt="" class="image-box"
      /></swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: "carrousel",
  data() {
    return {
      imgList: [
        {
          id: "0",
          img: require("@/assets/img/img1.jpg"),
        },
        {
          id: "1",
          img: require("@/assets/img/img2.jpg"),
        },
      ],
      swiperOptions: {
        pagination: {
          el: ".swiper-pagination",
        },
        loop: true,
        // Some Swiper option/callback...
      },
    };
  },
};
</script>

<style lang="stylus" scope>
.swiper-box 
    width: 100%
    height: 0
    background-color #fff
    padding-bottom 26.67%
    .image-box
        width 100%
        height 2rem

</style>
